\input{preamble}

% OK, start here.
%
\begin{document}

\title{Resolution of Surfaces Revisited}


\maketitle

\phantomsection
\label{section-phantom}

\tableofcontents

\section{Introduction}
\label{section-introduction}

\noindent
This chapter discusses resolution of singularities of
Noetherian algebraic spaces of dimension $2$.
We have already discussed resolution of surfaces
for schemes following Lipman \cite{Lipman} in an earlier
chapter. See
Resolution of Surfaces, Section \ref{resolve-section-introduction}.
Most of the results in this chapter are straightforward
consequences of the results on schemes.

\medskip\noindent
Unless specifically mentioned otherwise all geometric objects
in this chapter will be algebraic spaces. Thus if we say
``let $f : X \to Y$ be a modification'' then this means that
$f$ is a morphism as in Spaces over Fields, Definition
\ref{spaces-over-fields-definition-modification}.
Similarly for proper morphism, etc, etc.










\section{Modifications}
\label{section-modifications}

\noindent
Let $(A, \mathfrak m, \kappa)$ be a Noetherian local ring. We set
$S = \Spec(A)$ and $U = S \setminus \{\mathfrak m\}$. In this section
we will consider the category
\begin{equation}
\label{equation-modification}
\left\{
f : X \longrightarrow S
\quad \middle| \quad
\begin{matrix}
X\text{ is an algebraic space}\\
f\text{ is a proper morphism}\\
f^{-1}(U) \to U\text{ is an isomorphism}
\end{matrix}
\right\}
\end{equation}
A morphism from $X/S$ to $X'/S$ will be a morphism of algebraic spaces
$X \to X'$ compatible with the structure morphisms over $S$. In
Algebraization of Formal Spaces, Section \ref{restricted-section-modifications}
we have seen that this category only depends on the completion of $A$
and we have proven some elementary properties of objects in this category.
In this section we specifically study cases where
$\dim(A) \leq 2$ or where the dimension of the closed fibre is at most $1$.

\begin{lemma}
\label{lemma-modification}
Let $(A, \mathfrak m, \kappa)$ be a $2$-dimensional Noetherian
local domain such that $U = \Spec(A) \setminus \{\mathfrak m\}$
is a normal scheme. Then any modification $f : X \to \Spec(A)$
is a morphism as in (\ref{equation-modification}).
\end{lemma}

\begin{proof}
Let $f : X \to S$ be a modification. We have to show that
$f^{-1}(U) \to U$ is an isomorphism. Since every closed point $u$ of $U$
has codimension $1$, this follows from
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-modification-normal-iso-over-codimension-1}.
\end{proof}

\begin{lemma}
\label{lemma-closed-immersion-on-fibre}
Let $(A, \mathfrak m, \kappa)$ be a Noetherian local ring.
Let $g : X \to Y$ be a morphism in the category (\ref{equation-modification}).
If the induced morphism $X_\kappa \to Y_\kappa$ of special fibres is
a closed immersion, then $g$ is a closed immersion.
\end{lemma}

\begin{proof}
This is a special case of
More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-where-closed-immersion}.
\end{proof}

\begin{lemma}
\label{lemma-dimension-special-fibre}
Let $(A, \mathfrak m, \kappa)$ be a Noetherian local domain
of dimension $\geq 1$.
Let $f : X \to \Spec(A)$ be a morphism of algebraic spaces.
Assume at least one of the following conditions is satisfied
\begin{enumerate}
\item $f$ is a modification (Spaces over Fields, Definition
\ref{spaces-over-fields-definition-modification}),
\item $f$ is an alteration (Spaces over Fields, Definition
\ref{spaces-over-fields-definition-alteration}),
\item $f$ is locally of finite type, quasi-separated, $X$ is integral,
and there is exactly one point of $|X|$ mapping to the generic point
of $\Spec(A)$,
\item $f$ is locally of finite type, $X$ is decent, and the points
of $|X|$ mapping to the generic point of $\Spec(A)$ are
the generic points of irreducible components of $|X|$,
\item add more here.
\end{enumerate}
Then $\dim(X_\kappa) \leq \dim(A) - 1$.
\end{lemma}

\begin{proof}
Cases (1), (2), and (3) are special cases of (4). Choose an affine scheme
$U = \Spec(B)$ and an \'etale morphism $U \to X$. The ring map $A \to B$
is of finite type. We have to show that
$\dim(U_\kappa) \leq \dim(A) - 1$. Since $X$ is decent, the generic
points of irreducible components of $U$ are the points lying over
generic points of irreducible components of $|X|$, see
Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-generic-points}.
Hence the fibre of $\Spec(B) \to \Spec(A)$ over $(0)$
is the (finite) set of minimal primes $\mathfrak q_1, \ldots, \mathfrak q_r$
of $B$. Thus $A_f \to B_f$ is finite for some nonzero $f \in A$
(Algebra, Lemma \ref{algebra-lemma-generically-finite}).
We conclude $\kappa(\mathfrak q_i)$ is a finite extension of the
fraction field of $A$.
Let $\mathfrak q \subset B$ be a prime lying over $\mathfrak m$. Then
$$
\dim(B_\mathfrak q) = \max \dim((B/\mathfrak q_i)_{\mathfrak q})
\leq \dim(A)
$$
the inequality by the dimension formula for $A \subset B/\mathfrak q_i$, see
Algebra, Lemma \ref{algebra-lemma-dimension-formula}.
However, the dimension of $B_\mathfrak q/\mathfrak m B_\mathfrak q$
(which is the local ring of $U_\kappa$ at the corresponding point)
is at least one less because the minimal primes $\mathfrak q_i$
are not in $V(\mathfrak m)$. We conclude by
Properties, Lemma \ref{properties-lemma-dimension}.
\end{proof}

\begin{lemma}
\label{lemma-modification-of-dim-2-is-projective-over-complete}
If $(A, \mathfrak m, \kappa)$ is a complete Noetherian local domain
of dimension $2$, then every modification of $\Spec(A)$ is projective over $A$.
\end{lemma}

\begin{proof}
By More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-projective-over-complete}
it suffices to show that the special fibre of any modification
$X$ of $\Spec(A)$ has dimension $\leq 1$.
This follows from Lemma \ref{lemma-dimension-special-fibre}.
\end{proof}






\section{Strategy}
\label{section-strategy}

\noindent
Let $S$ be a scheme. Let $X$ be a decent algebraic space over $S$.
Let $x_1, \ldots, x_n \in |X|$ be pairwise distinct closed points.
For each $i$ we pick an elementary \'etale neighbourhood
$(U_i, u_i) \to (X, x_i)$ as in Decent Spaces, Lemma
\ref{decent-spaces-lemma-decent-space-elementary-etale-neighbourhood}.
This means that $U_i$ is an affine scheme, $U_i \to X$ is \'etale,
$u_i$ is the unique point of $U_i$ lying over $x_i$, and
$\Spec(\kappa(u_i)) \to X$ is a monomorphism representing $x_i$.
After shrinking $U_i$ we may and do assume that for $j \not = i$
there does not exist a point of $U_i$ mapping to $x_j$.
Observe that $u_i \in U_i$ is a closed point.

\medskip\noindent
Denote $\mathcal{C}_{X, \{x_1, \ldots, x_n\}}$ the category of
morphisms of algebraic spaces $f : Y \to X$ which induce an isomorphism
$f^{-1}(X \setminus \{x_1, \ldots, x_n\}) \to X \setminus \{x_1, \ldots, x_n\}$.
For each $i$ denote $\mathcal{C}_{U_i, u_i}$ the category of
morphisms of algebraic spaces $g_i : Y_i \to U_i$ which induce an
isomorphism $g_i^{-1}(U_i \setminus \{u_i\}) \to U_i \setminus \{u_i\}$.
Base change defines an functor
\begin{equation}
\label{equation-equivalence}
F :
\mathcal{C}_{X, \{x_1, \ldots, x_n\}}
\longrightarrow
\mathcal{C}_{U_1, u_1} \times \ldots \times \mathcal{C}_{U_n, u_n}
\end{equation}
To reduce at least some of the problems in this chapter to the case
of schemes we have the following lemma.

\begin{lemma}
\label{lemma-equivalence}
The functor $F$ (\ref{equation-equivalence}) is an equivalence.
\end{lemma}

\begin{proof}
For $n = 1$ this is Limits of Spaces, Lemma
\ref{spaces-limits-lemma-excision-modifications}.
For $n > 1$ the lemma can be proved in exactly the same way or it
can be deduced from it. For example, suppose that
$g_i : Y_i \to U_i$ are objects of $\mathcal{C}_{U_i, u_i}$.
Then by the case $n = 1$ we can find $f'_i : Y'_i \to X$
which are isomorphisms over $X \setminus \{x_i\}$ and whose
base change to $U_i$ is $f_i$. Then we can set
$$
f : Y = Y'_1 \times_X \ldots \times_X Y'_n \to X
$$
This is an object of $\mathcal{C}_{X, \{x_1, \ldots, x_n\}}$
whose base change by $U_i \to X$ recovers $g_i$. Thus the functor
is essentially surjective. We omit the proof of
fully faithfulness.
\end{proof}

\begin{lemma}
\label{lemma-equivalence-properties}
Let $X, x_i, U_i \to X, u_i$ be as in (\ref{equation-equivalence}).
If $f : Y \to X$ corresponds to $g_i : Y_i \to U_i$ under $F$,
then $f$ is quasi-compact, quasi-separated, separated, locally of finite
presentation, of finite presentation, locally of finite type, of finite type,
proper, integral, finite, if and only if $g_i$ is so
for $i = 1, \ldots, n$.
\end{lemma}

\begin{proof}
Follows from Limits of Spaces, Lemma
\ref{spaces-limits-lemma-excision-modifications-properties}.
\end{proof}

\begin{lemma}
\label{lemma-equivalence-fibre}
Let $X, x_i, U_i \to X, u_i$ be as in (\ref{equation-equivalence}).
If $f : Y \to X$ corresponds to $g_i : Y_i \to U_i$ under $F$,
then $Y_{x_i} \cong (Y_i)_{u_i}$ as algebraic spaces.
\end{lemma}

\begin{proof}
This is clear because $u_i \to x_i$ is an isomorphism.
\end{proof}







\section{Dominating by quadratic transformations}
\label{section-quadratic-spaces}

\noindent
We define the blowup of a space at a point only if $X$ is decent.

\begin{definition}
\label{definition-blowup-at-point}
Let $S$ be a scheme. Let $X$ be a decent algebraic space over $S$.
Let $x \in |X|$ be a closed point. By
Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-space-closed-point}
we can represent $x$ by a closed immersion $i : \Spec(k) \to X$.
The {\it blowing up $X' \to X$ of $X$ at $x$} means the blowing up of $X$
in the closed subspace $Z = i(\Spec(k)) \subset X$.
\end{definition}

\noindent
In this generality the blowing up of $X$ at $x$ is not necessarily proper.
However, if $X$ is locally Noetherian, then it follows from
Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-blowing-up-projective}
that the blowing up is proper.
Recall that a locally Noetherian algebraic space is Noetherian if
and only if it is quasi-compact and quasi-separated. Moreover, for
a locally Noetherian algebraic space, being quasi-separated is
equivalent to being decent (Decent Spaces, Lemma
\ref{decent-spaces-lemma-locally-Noetherian-decent-quasi-separated}).

\begin{lemma}
\label{lemma-equivalence-sequence-blowups}
Let $X, x_i, U_i \to X, u_i$ be as in (\ref{equation-equivalence})
and assume $f : Y \to X$ corresponds to $g_i : Y_i \to U_i$ under $F$.
Then there exists a factorization
$$
Y = Z_m \to Z_{m - 1} \to \ldots \to Z_1 \to Z_0 = X
$$
of $f$ where $Z_{j + 1} \to Z_j$ is the blowing up of $Z_j$ at a closed
point $z_j$ lying over $\{x_1, \ldots, x_n\}$ if and only if for each
$i$ there exists a factorization
$$
Y_i = Z_{i, m_i} \to Z_{i, m_i - 1} \to \ldots \to Z_{i, 1} \to Z_{i, 0} = U_i
$$
of $g_i$ where $Z_{i, j + 1} \to Z_{i, j}$ is the blowing up of $Z_{i, j}$
at a closed point $z_{i, j}$ lying over $u_i$.
\end{lemma}

\begin{proof}
A blowing up is a representable morphism. Hence in either case
we inductively see that $Z_j \to X$ or $Z_{i, j} \to U_i$ is
representable. Whence each $Z_j$ or $Z_{i, j}$ is a decent
algebraic space by Decent Spaces, Lemma
\ref{decent-spaces-lemma-representable-named-properties}.
This shows that the assertions make sense (since blowing up
is only defined for decent spaces).
To prove the equivalence, let's start with a sequence of blowups
$Z_m \to Z_{m - 1} \to \ldots \to Z_1 \to Z_0 = X$.
The first morphism $Z_1 \to X$ is given
by blowing up one of the $x_i$, say $x_1$. Applying $F$
to $Z_1 \to X$ we find a blowup $Z_{1, 1} \to U_1$ at $u_1$
is the blowing up at $u_1$ and otherwise $Z_{i, 0} = U_i$ for $i > 1$.
In the next step, we either blow up one of the $x_i$, $i \geq 2$
on $Z_1$ or we pick a closed point $z_1$ of the fibre of $Z_1 \to X$
over $x_1$. In the first case it is clear what to do and in
the second case we use that $(Z_1)_{x_1} \cong (Z_{1, 1})_{u_1}$
(Lemma \ref{lemma-equivalence-fibre})
to get a closed point $z_{1, 1} \in Z_{1, 1}$ corresponding to $z_1$.
Then we set $Z_{1, 2} \to Z_{1, 1}$ equal to the blowing up
in $z_{1, 1}$. Continuing in this manner we construct the factorizations
of each $g_i$.

\medskip\noindent
Conversely, given sequences of blowups
$Z_{i, m_i} \to Z_{i, m_i - 1} \to \ldots \to Z_{i, 1} \to Z_{i, 0} = U_i$
we construct the sequence of blowing ups of $X$ in exactly the same manner.
\end{proof}

\begin{lemma}
\label{lemma-make-ideal-principal}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$.
Let $T \subset |X|$ be a finite set of closed points $x$ such that
(1) $X$ is regular at $x$ and (2) the local ring of $X$ at $x$ has
dimension $2$. Let $\mathcal{I} \subset \mathcal{O}_X$ be a quasi-coherent
sheaf of ideals such that $\mathcal{O}_X/\mathcal{I}$ is supported on $T$.
Then there exists a sequence
$$
X_m \to X_{m - 1} \to \ldots \to X_1 \to X_0 = X
$$
where $X_{j + 1} \to X_j$ is the blowing up of $X_j$ at a closed
point $x_j$ lying above a point of $T$ such that
$\mathcal{I}\mathcal{O}_{X_n}$ is an invertible ideal sheaf.
\end{lemma}

\begin{proof}
Say $T = \{x_1, \ldots, x_r\}$. Pick elementary \'etale neighbourhoods
$(U_i, u_i) \to (X, x_i)$ as in Section \ref{section-strategy}.
For each $i$ the restriction
$\mathcal{I}_i = \mathcal{I}|_{U_i} \subset \mathcal{O}_{U_i}$
is a quasi-coherent sheaf of ideals supported at $u_i$.
The local ring of $U_i$ at $u_i$ is regular and has dimension $2$.
Thus we may apply
Resolution of Surfaces, Lemma \ref{resolve-lemma-make-ideal-principal}
to find a sequence
$$
X_{i, m_i} \to X_{i, m_i - 1} \to \ldots \to X_1 \to X_{i, 0} = U_i
$$
of blowing ups in closed points lying over $u_i$ such that
$\mathcal{I}_i \mathcal{O}_{X_{i, m_i}}$ is invertible.
By Lemma \ref{lemma-equivalence-sequence-blowups}
we find a sequence of blowing ups
$$
X_m \to X_{m - 1} \to \ldots \to X_1 \to X_0 = X
$$
as in the statement of the lemma whose base change to our $U_i$
produces the given sequences. It follows that
$\mathcal{I}\mathcal{O}_{X_n}$ is an invertible ideal sheaf.
Namely, we know this is true over $X \setminus \{x_1, \ldots, x_n\}$
and in an \'etale neighbourhood of the fibre of each $x_i$
it is true by construction.
\end{proof}

\begin{lemma}
\label{lemma-dominate-by-blowing-up-in-points}
Let $S$ be a scheme. Let $X$ be a Noetherian algebraic space over $S$.
Let $T \subset |X|$ be a finite set of closed points $x$ such that
(1) $X$ is regular at $x$ and (2) the local ring of $X$ at $x$ has
dimension $2$. Let $f : Y \to X$ be a proper morphism of
algebraic spaces which is an isomorphism over $U = X \setminus T$.
Then there exists a sequence
$$
X_n \to X_{n - 1} \to \ldots \to X_1 \to X_0 = X
$$
where $X_{i + 1} \to X_i$ is the blowing up of $X_i$ at a closed
point $x_i$ lying above a point of $T$ and a factorization $X_n \to Y \to X$
of the composition.
\end{lemma}

\begin{proof}
By More on Morphisms of Spaces,
Lemma \ref{spaces-more-morphisms-lemma-dominate-modification-by-blowup} 
there exists a $U$-admissible blowup $X' \to X$ which dominates
$Y \to X$. Hence we may assume there exists an ideal sheaf
$\mathcal{I} \subset \mathcal{O}_X$ such that
$\mathcal{O}_X/\mathcal{I}$ is supported on $T$ and such that
$Y$ is the blowing up of $X$ in $\mathcal{I}$.
By Lemma \ref{lemma-make-ideal-principal} 
there exists a sequence
$$
X_n \to X_{n - 1} \to \ldots \to X_1 \to X_0 = X
$$
where $X_{i + 1} \to X_i$ is the blowing up of $X_i$ at a closed
point $x_i$ lying above a point of $T$ such that
$\mathcal{I}\mathcal{O}_{X_n}$ is an invertible ideal sheaf.
By the universal property of blowing up
(Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-universal-property-blowing-up})
we find the desired factorization.
\end{proof}





\section{Dominating by normalized blowups}
\label{section-normalized-blowups}

\noindent
In this section we prove that a modification of a surface can be dominated
by a sequence of normalized blowups in points.

\begin{definition}
\label{definition-normalized-blowup}
Let $S$ be a scheme. Let $X$ be a decent algebraic space over $S$ satisfying
the equivalent conditions of
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-prepare-normalization}.
Let $x \in |X|$ be a closed point. The {\it normalized blowup of $X$ at $x$}
is the composition $X'' \to X' \to X$ where $X' \to X$ is the blowup
of $X$ at $x$ (Definition \ref{definition-blowup-at-point})
and $X'' \to X'$ is the normalization of $X'$.
\end{definition}

\noindent
Here the normalization $X'' \to X'$ is defined as the algebraic space
$X'$ satisfies the equivalent conditions of
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-prepare-normalization}
by
Divisors on Spaces, Lemma
\ref{spaces-divisors-lemma-blowup-finite-nr-irreducibles}.
See Morphisms of Spaces, Definition
\ref{spaces-morphisms-definition-normalization}
for the definition of the normalization.

\medskip\noindent
In general the normalized blowing up need not be proper even
when $X$ is Noetherian. Recall that an algebraic space is Nagata if it
has an \'etale covering by affines which are spectra of Nagata rings
(Properties of Spaces, Definition
\ref{spaces-properties-definition-type-property} and
Remark \ref{spaces-properties-remark-list-properties-local-etale-topology} and
Properties, Definition \ref{properties-definition-nagata}).

\begin{lemma}
\label{lemma-Nagata-normalized-blowup}
In Definition \ref{definition-normalized-blowup} if $X$ is Nagata,
then the normalized blowing up of $X$ at $x$ is a
normal Nagata algebraic space proper over $X$.
\end{lemma}

\begin{proof}
The blowup morphism $X' \to X$ is proper
(as $X$ is locally Noetherian we may apply
Divisors on Spaces, Lemma \ref{spaces-divisors-lemma-blowing-up-projective}).
Thus $X'$ is Nagata
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-finite-type-nagata}).
Therefore the normalization $X'' \to X'$ is finite
(Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-nagata-normalization})
and we conclude that $X'' \to X$ is proper as well
(Morphisms of Spaces, Lemmas \ref{spaces-morphisms-lemma-finite-proper} and
\ref{spaces-morphisms-lemma-composition-proper}).
It follows that the normalized blowing up
is a normal (Morphisms of Spaces, Lemma
\ref{spaces-morphisms-lemma-normalization-normal})
Nagata algebraic space.
\end{proof}

\noindent
Here is the analogue of
Lemma \ref{lemma-equivalence-sequence-blowups}
for normalized blowups.

\begin{lemma}
\label{lemma-equivalence-sequence-normalized-blowups}
Let $X, x_i, U_i \to X, u_i$ be as in (\ref{equation-equivalence})
and assume $f : Y \to X$ corresponds to $g_i : Y_i \to U_i$ under $F$.
Assume $X$ satisfies the equivalent conditions of
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-prepare-normalization}.
Then there exists a factorization
$$
Y = Z_m \to Z_{m - 1} \to \ldots \to Z_1 \to Z_0 = X
$$
of $f$ where $Z_{j + 1} \to Z_j$ is the normalized blowing up of $Z_j$
at a closed point $z_j$ lying over $\{x_1, \ldots, x_n\}$ if and only if
for each $i$ there exists a factorization
$$
Y_i = Z_{i, m_i} \to Z_{i, m_i - 1} \to \ldots \to Z_{i, 1} \to Z_{i, 0} = U_i
$$
of $g_i$ where $Z_{i, j + 1} \to Z_{i, j}$ is the normalized blowing up of
$Z_{i, j}$ at a closed point $z_{i, j}$ lying over $u_i$.
\end{lemma}

\begin{proof}
This follows by the exact same argument as used to prove
Lemma \ref{lemma-equivalence-sequence-blowups}.
\end{proof}

\noindent
A Nagata algebraic space is locally Noetherian.

\begin{lemma}
\label{lemma-dominate-by-normalized-blowing-up}
Let $S$ be a scheme. Let $X$ be a Noetherian Nagata algebraic space over $S$
with $\dim(X) = 2$. Let $f : Y \to X$ be a proper birational morphism.
Then there exists a commutative diagram
$$
\xymatrix{
X_n \ar[r] \ar[d] &
X_{n - 1} \ar[r] &
\ldots \ar[r] &
X_1 \ar[r] &
X_0 \ar[d] \\
Y \ar[rrrr]  & & & & X
}
$$
where $X_0 \to X$ is the normalization and
where $X_{i + 1} \to X_i$ is the normalized blowing up of $X_i$ at a closed
point.
\end{lemma}

\begin{proof}
Although one can prove this lemma directly for algebraic spaces,
we will continue the approach used above to reduce it to the case
of schemes.

\medskip\noindent
We will use that Noetherian algebraic spaces are quasi-separated
and hence points have well defined residue fields (for example by
Decent Spaces, Lemma
\ref{decent-spaces-lemma-decent-space-elementary-etale-neighbourhood}).
We will use the results of Morphisms of Spaces, Sections
\ref{spaces-morphisms-section-nagata},
\ref{spaces-morphisms-section-dimension-formula}, and
\ref{spaces-morphisms-section-normalization} without further mention.
We may replace $Y$ by its normalization. Let $X_0 \to X$ be the normalization.
The morphism $Y \to X$ factors through $X_0$.
Thus we may assume that both $X$ and $Y$ are normal.

\medskip\noindent
Assume $X$ and $Y$ are normal. The morphism $f : Y \to X$ is an isomorphism
over an open which contains every point of codimension $0$ and $1$ in $Y$ and
every point of $Y$ over which the fibre is finite, see
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-modification-normal-iso-over-codimension-1}.
Hence we see that there is a finite set of closed points $T \subset |X|$
such that $f$ is an isomorphism over $X \setminus T$.
By More on Morphisms of Spaces, Lemma
\ref{spaces-more-morphisms-lemma-dominate-modification-by-blowup}
there exists an $X \setminus T$-admissible blowup $Y' \to X$
which dominates $Y$. After replacing $Y$ by the normalization of
$Y'$ we see that we may assume that $Y \to X$ is representable.

\medskip\noindent
Say $T = \{x_1, \ldots, x_r\}$. Pick elementary \'etale neighbourhoods
$(U_i, u_i) \to (X, x_i)$ as in Section \ref{section-strategy}.
For each $i$ the morphism $Y_i = Y \times_X U_i \to U_i$
is a proper birational morphism which is an isomorphism over
$U_i \setminus \{u_i\}$. Thus we may apply
Resolution of Surfaces, Lemma
\ref{resolve-lemma-dominate-by-normalized-blowing-up}
to find a sequence
$$
X_{i, m_i} \to X_{i, m_i - 1} \to \ldots \to X_1 \to X_{i, 0} = U_i
$$
of normalized blowing ups in closed points lying over $u_i$ such that
$X_{i, m_i}$ dominates $Y_i$.
By Lemma \ref{lemma-equivalence-sequence-normalized-blowups}
we find a sequence of normalized blowing ups
$$
X_m \to X_{m - 1} \to \ldots \to X_1 \to X_0 = X
$$
as in the statement of the lemma whose base change to our $U_i$
produces the given sequences. It follows that $X_m$ dominates
$Y$ by the equivalence of categories of
Lemma \ref{lemma-equivalence}.
\end{proof}















\section{Base change to the completion}
\label{section-aux}

\noindent
The following simple lemma will turn out to be a useful tool in what follows.

\begin{lemma}
\label{lemma-iso-completions}
Let $(A, \mathfrak m, \kappa)$ be a local ring with finitely generated
maximal ideal $\mathfrak m$. Let $X$ be a decent algebraic
space over $A$. Let $Y = X \times_{\Spec(A)} \Spec(A^\wedge)$ where
$A^\wedge$ is the $\mathfrak m$-adic completion of $A$.
For a point $q \in |Y|$ with image $p \in |X|$ lying
over the closed point of $\Spec(A)$ the map
$\mathcal{O}_{X, p}^h \to \mathcal{O}_{Y, q}^h$
of henselian local rings induces an isomorphism on completions.
\end{lemma}

\begin{proof}
This follows immediately from the case of schemes by
choosing an elementary \'etale neighbourhood $(U, u) \to (X, p)$
as in Decent Spaces, Lemma
\ref{decent-spaces-lemma-decent-space-elementary-etale-neighbourhood},
setting $V = U \times_X Y = U \times_{\Spec(A)} \Spec(A^\wedge)$
and $v = (u, q)$.
The case of schemes is
Resolution of Surfaces, Lemma \ref{resolve-lemma-iso-completions}.
\end{proof}

\begin{lemma}
\label{lemma-port-regularity-to-completion}
Let $(A, \mathfrak m, \kappa)$ be a Noetherian local ring.
Let $X \to \Spec(A)$ be a morphism which is locally of finite type
with $X$ a decent algebraic space. Set
$Y = X \times_{\Spec(A)} \Spec(A^\wedge)$. Let $y \in |Y|$
with image $x \in |X|$. Then
\begin{enumerate}
\item if $\mathcal{O}_{Y, y}^h$ is regular, then
$\mathcal{O}_{X, x}^h$ is regular,
\item if $y$ is in the closed fibre, then $\mathcal{O}_{Y, y}^h$ is regular
$\Leftrightarrow \mathcal{O}_{X, x}^h$ is regular, and
\item If $X$ is proper over $A$, then $X$ is regular
if and only if $Y$ is regular.
\end{enumerate}
\end{lemma}

\begin{proof}
By \'etale localization the first two statements follow
immediately from the counter part to this lemma for schemes, see
Resolution of Surfaces, Lemma \ref{resolve-lemma-port-regularity-to-completion}.
For part (3), since $Y \to X$ is surjective (as $A \to A^\wedge$
is faithfully flat) we see that $Y$ regular implies $X$ regular
by part (1). Conversely, if $X$ is regular, then the henselian
local rings of $Y$ are regular for all points of the special fibre.
Let $y \in |Y|$ be a general point.
Since $|Y| \to |\Spec(A^\wedge)|$ is closed in the proper
case, we can find a specialization $y \leadsto y_0$ with
$y_0$ in the closed fibre. Choose an elementary \'etale
neighbourhood $(V, v_0) \to (Y, y_0)$ as in
Decent Spaces, Lemma
\ref{decent-spaces-lemma-decent-space-elementary-etale-neighbourhood}.
Since $Y$ is decent we can lift $y \leadsto y_0$ to a specialization
$v \leadsto v_0$ in $V$
(Decent Spaces, Lemma \ref{decent-spaces-lemma-decent-specialization}).
Then we conclude that
$\mathcal{O}_{V, v}$ is a localization of $\mathcal{O}_{V, v_0}$
hence regular and the proof is complete.
\end{proof}

\begin{lemma}
\label{lemma-formally-unramified}
Let $(A, \mathfrak m)$ be a local Noetherian ring. Let
$X$ be an algebraic space over $A$. Assume
\begin{enumerate}
\item $A$ is analytically unramified
(Algebra, Definition \ref{algebra-definition-analytically-unramified}),
\item $X$ is locally of finite type over $A$,
\item $X \to \Spec(A)$ is \'etale at every point of codimension $0$ in $X$.
\end{enumerate}
Then the normalization of $X$ is finite over $X$.
\end{lemma}

\begin{proof}
Choose a scheme $U$ and a surjective \'etale morphism $U \to X$.
Then $U \to \Spec(A)$ satisfies the assumptions and hence the
conclusions of
Resolution of Surfaces, Lemma \ref{resolve-lemma-formally-unramified}.
\end{proof}











\section{Implied properties}
\label{section-existence-gives}

\noindent
In this section we prove that for a Noetherian integral algebraic space
the existence of a regular alteration has quite a few consequences.
This section should be skipped by those not interested in ``bad''
Noetherian algebraic spaces.

\begin{lemma}
\label{lemma-regular-alteration-implies}
Let $S$ be a scheme. Let $Y$ be a Noetherian integral algebraic space
over $S$. Assume there exists an alteration
$f : X \to Y$ with $X$ regular. Then the normalization $Y^\nu \to Y$
is finite and $Y$ has a dense open which is regular.
\end{lemma}

\begin{proof}
By \'etale localization, it suffices to prove this when
$Y = \Spec(A)$ where $A$ is a Noetherian domain.
Let $B$ be the integral closure of $A$ in its fraction field.
Set $C = \Gamma(X, \mathcal{O}_X)$. By
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-proper-pushforward-coherent}
we see that $C$ is a finite $A$-module.
As $X$ is normal
(Properties of Spaces, Lemma
\ref{spaces-properties-lemma-regular-normal})
we see that $C$ is normal domain
(Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-normal-integral-sections}).
Thus $B \subset C$ and we conclude that $B$ is finite over $A$
as $A$ is Noetherian.

\medskip\noindent
There exists a nonempty open $V \subset Y$ such that $f^{-1}V \to V$
is finite, see Spaces over Fields, Definition
\ref{spaces-over-fields-definition-alteration}.
After shrinking $V$ we may assume that $f^{-1}V \to V$ is flat
(Morphisms of Spaces, Proposition
\ref{spaces-morphisms-proposition-generic-flatness-reduced}).
Thus $f^{-1}V \to V$ is faithfully flat. Then $V$ is regular by
Algebra, Lemma \ref{algebra-lemma-descent-regular}.
\end{proof}

\begin{lemma}
\label{lemma-regular-alteration-implies-local}
Let $(A, \mathfrak m, \kappa)$ be a local Noetherian domain.
Assume there exists an alteration $f : X \to \Spec(A)$
with $X$ regular. Then
\begin{enumerate}
\item there exists a nonzero $f \in A$ such that $A_f$ is regular,
\item the integral closure $B$ of $A$ in its fraction field is finite over $A$,
\item the $\mathfrak m$-adic completion of $B$ is a normal ring, i.e., the
completions of $B$ at its maximal ideals are normal domains, and
\item the generic formal fibre of $A$ is regular.
\end{enumerate}
\end{lemma}

\begin{proof}
Parts (1) and (2) follow from Lemma \ref{lemma-regular-alteration-implies}.
We have to redo part of the proof of that lemma in order to set up notation
for the proof of (3). Set $C = \Gamma(X, \mathcal{O}_X)$. By
Cohomology of Spaces, Lemma
\ref{spaces-cohomology-lemma-proper-pushforward-coherent}
we see that $C$ is a finite $A$-module.
As $X$ is normal
(Properties of Spaces, Lemma
\ref{spaces-properties-lemma-regular-normal})
we see that $C$ is normal domain
(Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-normal-integral-sections}).
Thus $B \subset C$ and we conclude that $B$ is finite over $A$
as $A$ is Noetherian. By
Resolution of Surfaces, Lemma \ref{resolve-lemma-algebra-helper}
in order to prove (3) it suffices to show
that the $\mathfrak m$-adic completion $C^\wedge$ is normal.

\medskip\noindent
By Algebra, Lemma \ref{algebra-lemma-completion-finite-extension}
the completion $C^\wedge$ is the product of the completions of
$C$ at the prime ideals of $C$ lying over $\mathfrak m$.
There are finitely many of these and these are the maximal
ideals $\mathfrak m_1, \ldots, \mathfrak m_r$ of $C$.
(The corresponding result for $B$ explains the final statement of the lemma.)
Thus replacing $A$ by $C_{\mathfrak m_i}$ and $X$ by
$X_i = X \times_{\Spec(C)} \Spec(C_{\mathfrak m_i})$
we reduce to the case discussed in the next paragraph.
(Note that $\Gamma(X_i, \mathcal{O}) = C_{\mathfrak m_i}$ by
Cohomology of Spaces,
Lemma \ref{spaces-cohomology-lemma-flat-base-change-cohomology}.)

\medskip\noindent
Here $A$ is a Noetherian local normal domain and $f : X \to \Spec(A)$
is a regular alteration with $\Gamma(X, \mathcal{O}_X) = A$.
We have to show that the completion $A^\wedge$
of $A$ is a normal domain. By
Lemma \ref{lemma-port-regularity-to-completion}
$Y = X \times_{\Spec(A)} \Spec(A^\wedge)$ is regular.
Since $\Gamma(Y, \mathcal{O}_Y) = A^\wedge$
by Cohomology of Spaces,
Lemma \ref{spaces-cohomology-lemma-flat-base-change-cohomology}.
We conclude that $A^\wedge$ is normal as before.
Namely, $Y$ is normal by Properties of Spaces, Lemma
\ref{spaces-properties-lemma-regular-normal}.
It is connected because $\Gamma(Y, \mathcal{O}_Y) = A^\wedge$ is local.
Hence $Y$ is normal and integral (as connected and normal
implies integral for separated algebraic spaces). Thus
$\Gamma(Y, \mathcal{O}_Y) = A^\wedge$ is a normal domain by
Spaces over Fields, Lemma
\ref{spaces-over-fields-lemma-normal-integral-sections}.
This proves (3).

\medskip\noindent
Proof of (4). Let $\eta \in \Spec(A)$ denote the generic point
and denote by a subscript $\eta$ the base change to $\eta$.
Since $f$ is an alteration, the scheme $X_\eta$ is finite and
faithfully flat over $\eta$. Since $Y = X \times_{\Spec(A)} \Spec(A^\wedge)$
is regular by Lemma \ref{lemma-port-regularity-to-completion}
we see that $Y_\eta$ is regular (as a limit of opens in $Y$).
Then $Y_\eta \to \Spec(A^\wedge \otimes_A \kappa(\eta))$ is finite
faithfully flat onto the generic formal fibre. We conclude by
Algebra, Lemma \ref{algebra-lemma-descent-regular}.
\end{proof}











\section{Resolution}
\label{section-resolution}

\noindent
Here is a definition.

\begin{definition}
\label{definition-resolution}
Let $S$ be a scheme. Let $Y$ be a Noetherian integral algebraic space over
$S$. A {\it resolution of singularities} of $X$ is a modification
$f : X \to Y$ such that $X$ is regular.
\end{definition}

\noindent
In the case of surfaces we sometimes want a bit more information.

\begin{definition}
\label{definition-resolution-surface}
Let $S$ be a scheme. Let $Y$ be a $2$-dimensional Noetherian integral
algebraic space over $S$. We say $Y$ has a
{\it resolution of singularities by normalized blowups}
if there exists a sequence
$$
Y_n \to X_{n - 1} \to \ldots \to Y_1 \to Y_0 \to Y
$$
where
\begin{enumerate}
\item $Y_i$ is proper over $Y$ for $i = 0, \ldots, n$,
\item $Y_0 \to Y$ is the normalization,
\item $Y_i \to Y_{i - 1}$ is a normalized blowup for $i = 1, \ldots, n$, and
\item $Y_n$ is regular.
\end{enumerate}
\end{definition}

\noindent
Observe that condition (1) implies that the normalization
$Y_0$ of $Y$ is finite over $Y$ and that the normalizations
used in the normalized blowing ups are finite as well.
We finally come to the main theorem of this chapter.

\begin{theorem}
\label{theorem-resolve}
Let $S$ be a scheme. Let $Y$ be a two dimensional integral
Noetherian algebraic space over $S$. The following are equivalent
\begin{enumerate}
\item there exists an alteration $X \to Y$ with $X$ regular,
\item there exists a resolution of singularities of $Y$,
\item $Y$ has a resolution of singularities by normalized blowups,
\item the normalization $Y^\nu \to Y$ is finite, $Y^\nu$ has
finitely many singular points $y_1, \ldots, y_m \in |Y|$, and
for each $i$ the completion of the henselian local ring
$\mathcal{O}_{Y^\nu, y_i}^h$ is normal.
\end{enumerate}
\end{theorem}

\begin{proof}
The implications (3) $\Rightarrow$ (2) $\Rightarrow$ (1) are immediate.

\medskip\noindent
Let $X \to Y$ be an alteration with $X$ regular. Then $Y^\nu \to Y$
is finite by Lemma \ref{lemma-regular-alteration-implies}.
Consider the factorization $f : X \to Y^\nu$ from 
Morphisms of Spaces, Lemma \ref{spaces-morphisms-lemma-normalization-normal}.
The morphism $f$ is finite over an open $V \subset Y^\nu$ containing
every point of codimension $\leq 1$ in $Y^\nu$
by Spaces over Fields, Lemma \ref{spaces-over-fields-lemma-finite-in-codim-1}.
Then $f$ is flat over $V$ by
Algebra, Lemma \ref{algebra-lemma-CM-over-regular-flat}
and the fact that a normal local ring
of dimension $\leq 2$ is Cohen-Macaulay by Serre's criterion
(Algebra, Lemma \ref{algebra-lemma-criterion-normal}).
Then $V$ is regular by Algebra, Lemma \ref{algebra-lemma-descent-regular}.
As $Y^\nu$ is Noetherian we conclude that
$Y^\nu \setminus V = \{y_1, \ldots, y_m\}$ is finite.
For each $i$ let $\mathcal{O}_{Y^\nu, y_i}^h$ be the henselian
local ring. Then $X \times_Y \Spec(\mathcal{O}_{Y^\nu, y_i}^h)$
is a regular alteration of $\Spec(\mathcal{O}_{Y^\nu, y_i}^h)$
(some details omitted).
By Lemma \ref{lemma-regular-alteration-implies-local}
the completion of $\mathcal{O}_{Y^\nu, y_i}^h$ is normal.
In this way we see that (1) $\Rightarrow$ (4).

\medskip\noindent
Assume (4). We have to prove (3). We may immediately replace
$Y$ by its normalization. Let $y_1, \ldots, y_m \in |Y|$ be the
singular points. Choose a collection of elementary \'etale neighbourhoods
$(V_i, v_i) \to (Y, y_i)$ as in Section \ref{section-strategy}.
For each $i$ the henselian local ring $\mathcal{O}_{Y^\nu, y_i}^h$
is the henselization of $\mathcal{O}_{V_i, v_i}$.
Hence these rings have isomorphic completions.
Thus by the result for schemes
(Resolution of Surfaces, Theorem \ref{resolve-theorem-resolve})
we see that there exist finite sequences of normalized blowups
$$
X_{i, n_i} \to X_{i, n_i - 1} \to \ldots \to V_i
$$
blowing up only in points lying over $v_i$ such that $X_{i, n_i}$
is regular. By Lemma \ref{lemma-equivalence-sequence-normalized-blowups}
there is a sequence of normalized blowing ups
$$
X_n \to X_{n - 1} \to \ldots \to X_1 \to Y
$$
and of course $X_n$ is regular too (look at the local rings).
This completes the proof.
\end{proof}















\section{Examples}
\label{section-examples}

\noindent
Some examples related to the results earlier in this chapter.

\begin{example}
\label{example-factorial}
\begin{reference}
\cite[4(c)]{Samuel-UFD}
\end{reference}
Let $k$ be a field. The ring $A = k[x, y, z]/(x^r + y^s + z^t)$
is a UFD for $r, s, t$ pairwise coprime integers. Namely, since
$x^r + y^s + z^t$ is irreducible $A$ is a domain. The element $z$
is a prime element, i.e., generates a prime ideal in $A$.
On the other hand, if $t = 1 + ers$ for some $e$, then
$$
A[1/z] \cong k[x', y', 1/z]
$$
where $x' = x/z^{es}$, $y' = y/z^{er}$ and $z = (x')^r + (y')^s$.
Thus $A[1/z]$ is a localization of a polynomial ring and hence
a UFD. It follows from an argument of Nagata that $A$ is a UFD.
See Algebra, Lemma \ref{algebra-lemma-invert-prime-elements}.
A similar argument can be given if $t$ is not congruent to $1$
modulo $rs$.
\end{example}

\begin{example}
\label{example-completion-not-factorial}
\begin{reference}
See \cite{Brieskorn} and \cite{Lipman-rational} for nonvanishing of
local Picard groups in general.
\end{reference}
The ring $A = \mathbf{C}[[x, y, z]]/(x^r + y^s + z^t)$
is not a UFD when $1 < r < s < t$ are pairwise coprime integers
and not equal to $2, 3, 5$. For example consider the special
case $A = \mathbf{C}[[x, y, z]]/(x^2 + y^5 + z^7)$.
Consider the maps
$$
\psi_\zeta : \mathbf{C}[[x, y, z]]/(x^2 + y^5 + z^7) \to \mathbf{C}[[t]]
$$
given by
$$
x \mapsto t^7,\quad
y \mapsto t^3,\quad
z \mapsto -\zeta t^2(1 + t)^{1/7}
$$
where $\zeta$ is a $7$th root of unity. The kernel $\mathfrak p_\zeta$
of $\psi_\zeta$ is a height one prime, hence if $A$ is a UFD, then
it is principal, say given by $f_\zeta \in \mathbf{C}[[x, y, z]]$.
Note that $V(x^3 - y^7) = \bigcup V(\mathfrak p_\zeta)$
and $A/(x^3 - y^7)$ is reduced away from the closed point. Hence,
still assuming $A$ is a UFD, we would obtain
$$
\prod\nolimits_\zeta f_\zeta = u(x^3 - y^7) + a(x^2 + y^5 + z^7)
\quad\text{in}\quad
\mathbf{C}[[x, y, z]]
$$
for some unit $u \in \mathbf{C}[[x, y, z]]$ and some
element $a \in \mathbf{C}[[x, y, z]]$. After scaling by a constant
we may assume $u(0, 0, 0) = 1$. Note that the left hand side vanishes to
order $7$. Hence $a = - x \bmod \mathfrak m^2$. But then we get a term
$xy^5$ on the right hand side which does not occur on the left
hand side. A contradiction.
\end{example}

\begin{example}
\label{example-not-blow-up}
There exists an excellent $2$-dimensional Noetherian local ring
and a modification $X \to S = \Spec(A)$ which is not a scheme.
We sketch a construction. Let $X$ be a normal surface over $\mathbf{C}$
with a unique singular point $x \in X$. Assume that there exists a
resolution $\pi : X' \to X$ such that the exceptional fibre
$C = \pi^{-1}(x)_{red}$ is a smooth projective curve. Furthermore, assume
there exists a point $c \in C$ such that if $\mathcal{O}_C(nc)$
is in the image of $\Pic(X') \to \Pic(C)$, then $n = 0$.
Then we let $X'' \to X'$ be the blowing up in the nonsingular point $c$.
Let $C' \subset X''$ be the strict transform of $C$ and let $E \subset X''$
be the exceptional fibre. By Artin's results
(\cite{ArtinII}; use for example \cite{Mumford-topology}
to see that the normal bundle of $C'$ is negative)
we can blow down the curve $C'$ in $X''$ to obtain an algebraic space $X'''$.
Picture
$$
\xymatrix{
& X'' \ar[ld] \ar[rd] \\
X' \ar[rd] &  & X''' \ar[ld] \\
& X
}
$$
We claim that $X'''$ is not a scheme. This provides us with our example
because $X'''$ is a scheme if and only if the base change of $X'''$
to $A = \mathcal{O}_{X, x}$ is a scheme (details omitted).
If $X'''$ where a scheme, then the image of $C'$ in $X'''$ would
have an affine neighbourhood. The complement of this neighbourhood
would be an effective Cartier divisor on $X'''$ (because $X'''$ is
nonsingular apart from $1$ point). This effective Cartier divisor would
correspond to an effective Cartier divisor on $X''$
meeting $E$ and avoiding $C'$. Taking the image in $X'$ we obtain
an effective Cartier divisor meeting $C$ (set theoretically) in $c$.
This is impossible as no multiple of $c$ is the restriction of a Cartier
divisor by assumption.

\medskip\noindent
To finish we have to find such a singular surface $X$. We can just take
$X$ to be the affine surface given by
$$
x^3 + y^3 + z^3 + x^4 + y^4 + z^4 = 0
$$
in $\mathbf{A}^3_\mathbf{C} = \Spec(\mathbf{C}[x, y, z])$ and singular point
$(0, 0, 0)$. Then $(0, 0, 0)$ is the only singular point. Blowing up $X$
in the maximal ideal corresponding to $(0, 0, 0)$ we find three charts each
isomorphic to the smooth affine surface
$$
1 + s^3 + t^3 + x(1 + s^4 + t^4) = 0
$$
which is nonsingular with exceptional divisor $C$ given by $x = 0$. The reader
will recognize $C$ as an elliptic curve. Finally, the surface $X$ is rational
as projection from $(0, 0, 0)$ shows, or because in the equation for the
blowup we can solve for $x$. Finally, the Picard group of a nonsingular
rational surface is countable, whereas the Picard group of an elliptic
curve over the complex numbers is uncountable. Hence we can find a closed
point $c$ as indicated.
\end{example}








\input{chapters}

\bibliography{my}
\bibliographystyle{amsalpha}

\end{document}
